gtkimcontext: Avoid gdk_device_get_associated_device()
authorCarlos Garnacho <carlosg@gnome.org>
Thu, 30 Jul 2020 12:29:24 +0000 (14:29 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 30 Jul 2020 16:30:13 +0000 (18:30 +0200)
Query the seat for that.

gtk/gtkimcontext.c

index b6997482ee24fa20b90b2f4156b8a348c2fbe683..85629b7c0d1f3e6c037362430f98f107765867bd 100644 (file)
@@ -549,7 +549,6 @@ gtk_im_context_filter_key (GtkIMContext    *context,
                            GdkModifierType  state,
                            int              group)
 {
-  GdkDevice *source_device;
   GdkTranslatedKey translated, no_lock;
   GdkEvent *key;
   gboolean ret;
@@ -560,16 +559,6 @@ gtk_im_context_filter_key (GtkIMContext    *context,
 
   g_return_val_if_fail (GTK_IS_IM_CONTEXT (context), FALSE);
 
-  if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL)
-    {
-      source_device = NULL;
-    }
-  else
-    {
-      source_device = device;
-      device = gdk_device_get_associated_device (source_device);
-    }
-
   if (!gdk_display_translate_key (gdk_surface_get_display (surface),
                                   keycode,
                                   state,